<template>
    <div class="pinchzoom" ref="pinchzoom">
        <img :src="src" alt="">
    </div>
</template> 

<script>
import PinchZoom from './pinchzoom.js'
export default {
    name: 'pinchzoom',
    props: ['src'],
    created() {
        const Vm = this
        setTimeout(() => {
            let el = Vm.$refs.pinchzoom
            new PinchZoom(el, {})
        }, 0)
    }
}
</script>

<style lang="less" scoped>
    .pinchzoom{
        width: 100%;
        background-color: #fff;
        img {
            width: 100%;
        }
    }
</style>
